<!-- 首页头部的组件 -->
<template>
  <div class="header">
    <div class="left">
      <!-- 返回的icon-->
      <div class="iconfont backicon">&#xe606;</div>
    </div>
    <div class="input">
      <!-- 查找的icon-->
      <span class="iconfont">&#xe60e;</span>
      输入框
    </div>
    <router-link to="/city">
      <div class="right">
        {{this.$store.state.city}}
        <!-- 下拉列表的icon-->
        <span class="iconfont xiaicon">&#xe62d;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'Home'
}
</script>

<!-- lang 设置使用stylus控制样式 scoped设置只对该页面的class生效 -->
<style lang="stylus" scoped>
  /* 使用别名路径时要加上~*/
  @import '~styles/config.styl'
  .header
    display: flex
    line-height: $lingheight
    background: $background
    color: #FFFFFF
    .left
      width: .64rem
      float: left
      .backicon
        text-align: center
        font-size: .4rem
        /* //padding-left .2rem */
    .input
      flex: 1
      line-height: .64rem
      height: .64rem
      border-radius: .1rem
      margin-top: .12rem
      margin-left: .2rem
      padding-left: .2rem
      background: #fff
      color: #ccc
    .right
      float: right
      text-align: center
      min-width: 1.24rem
      padding: 0 .1rem
      color: #fff
      .xiaicon
        font-size: .24rem
        margin-left: -.04rem
</style>
